package com.sright.bcard.user.biz.service;

import com.sright.bcard.common.service.share.dto.response.ConnnectUserListResponse;
import com.sright.bcard.common.service.share.dto.user.CardConnectUserInfoDTO;
import com.sright.bcard.user.biz.manager.CardConnectUserInfoManager;
import com.sright.bcard.user.share.service.CardConnectUserInfoService;
import com.sright.common.response.SrightResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
@Slf4j
public class CardConnectUserInfoServiceImpl implements CardConnectUserInfoService {

    @Autowired
    private CardConnectUserInfoManager cardConnectUserInfoManager;

    @Override
    public SrightResponse<Long> addCardConnectUserInfo(CardConnectUserInfoDTO cardConnectUserInfoDTO) {
        return SrightResponse.defaultSuccess(cardConnectUserInfoManager.addCardConnectUserInfo(cardConnectUserInfoDTO));
    }

    @Override
    public SrightResponse<List<ConnnectUserListResponse>> connectUserList(CardConnectUserInfoDTO cardConnectUserInfoDTO) {
        return SrightResponse.defaultSuccess(cardConnectUserInfoManager.connectUserList(cardConnectUserInfoDTO));
    }
}
